﻿using System;
using System.Globalization;

namespace Ndex.Core
{
    public interface IPersonName
    {
        string FirstName { get; set; }
        string LastName { get; set; }
        string MiddleName { get; set; }
    }

    public static class IPersonExt
    {
        public static string GetFullName(this IPersonName data, CultureInfo culture = null)
        {
            var name = string.Format("{0} {1} {2}", data.FirstName, data.MiddleName, data.LastName);
            return StringExt.Trim(name);
        }
    }
}
